package com.intel.two.controller.building;
import com.intel.two.common.R;
import com.intel.two.pojo.building.Janitor;
import com.intel.two.service.building.JanitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/janitor")
public class JanitorController {
    @Autowired
    private JanitorService janitorService;

    @RequestMapping("/janitors")
    public R janitors (){
        List<Janitor> janitors =janitorService.janitors();
        System.out.println(janitors);
        return R.ok().data("janitors",janitors);
    }
}
